<template>
  <a-form-model ref="form"  :model="dataObj" :rules="rules" style="padding: 0px">

    <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="appId" prop="appId" >
      <a-input style="width: 80%" :placeholder="i18n('form.appId','应用ID..')" v-model="dataObj.appId"/>
    </a-form-model-item>

    <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.secretId','secretId')"  prop="secretId">
      <a-input style="width: 80%" :placeholder="i18n('form.secretId','secretId','input')" v-model="dataObj.secretId"/>
    </a-form-model-item>
    <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.secretKey','secretKey')"  prop="secretKey">
      <a-input style="width: 80%" :placeholder="i18n('form.secretKey','secretKey','input')" v-model="dataObj.secretKey"/>
    </a-form-model-item>

    <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.bucketName','bucket名称')" prop="bucketName">
      <a-input style="width: 80%" :placeholder="i18n('form.bucketName','bucket名称','input')" v-model="dataObj.bucketName"/>
    </a-form-model-item>

      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.region','区域')" prop="region">
          <a-input style="width: 80%" :placeholder="i18n('form.region','区域')" v-model="dataObj.region"/>
      </a-form-model-item>
      <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.tmpPath','本地临时路径')"  prop="tmpPath">
          <a-input style="width: 80%" :placeholder="i18n('form.tmpPath','本地临时路径')" v-model="dataObj.tmpPath"/>
      </a-form-model-item>
  </a-form-model>
</template>

<script>
  import {BaseFormModel, RxDialog, Dialog} from "@lowcode/jpaas-common-lib";

  export default {
    name: "SysFileStoretenyunCos",
    mixins: [BaseFormModel],
    components: {
      RxDialog


    },
    props: {
      dataObj: {
        type: Object,
        default:()=> {
            return {
                appId:"",
                secretId:"",
                secretKey:"",
                bucketName:"",
                region:"",
                tmpPath:""
            }
        }
      }
    },

    data() {
      return {
          labelCol: { span: 3 },
          wrapperCol: { span: 22 },
          rules: {
                appId: [{required: true, message: this.i18n('form.appId','请输入应用ID','input'), trigger: 'change'}],
                secretId: [{required: true, message: this.i18n('form.secretId','请输入密钥ID','input'), trigger: 'change'}],
                secretKey: [{required: true, message: this.i18n('form.secretKey','请输入密钥','input'), trigger: 'change'}],
                bucketName: [{required: true, message: this.i18n('form.bucketName','请输入bucket名称','input'), trigger: 'change'}],
                region: [{required: true, message: this.i18n('form.region','请输入区域','input'), trigger: 'change'}],
                tmpPath: [{required: true, message: this.i18n('form.tmpPath','请输入临时路径','input'), trigger: 'change'}],
          }
      }
    },
    methods: {
      i18n(name,text,key){
          return this.$ti18(name,text,"SysFileStore",key);
      }
    }

  }
</script>

<style scoped>

</style>